<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  <link rel="stylesheet" href="/blog4/css/navigation.css" type="text/css"></link>
  
  <script type="text/javascript" src="/blog4/js/jquery-1.3.1.js"></script>
  <script type="text/javascript" src="/blog4/js/head.js"></script>
  </head>
  	
  <body>
   	<div class="navigation">
  		<div class="model-shifting">
  			<div class="top-nav">
  				<ul class="top-nav-ul">
  					<li id="nav-li-1" class="top-nav-li">
  						<a class="top-nav-link" href="${pageContext.request.contextPath }/article/showArticleByPage">首页</a></li>
  				<!-- 未登录时导航栏的显示 -->
  				<c:if test="${sessionScope.user == null}">
  					
  					<li id="nav-li-3" class="top-nav-li">
  						<a  class="top-nav-link" href="${pageContext.request.contextPath }/user/gotoLogin">登录</a></li>
  					<li id="nav-li-4" class="top-nav-li">
  						<a class="top-nav-link" href="${pageContext.request.contextPath }/user/gotoRegister">注册</a></li>
  						
  				</c:if>
  				<!-- 登录后导航栏显示 -->
  				<c:if test="${sessionScope.user !=null }">
					<li id="nav-li-7" class="top-nav-li" >
  						<a id="nav-li-7-a" class="top-nav-link"  href="${pageContext.request.contextPath }/article/showArticleByUser">个人中心</a></li>
  					<li id="nav-li-2" class="top-nav-li">
  						<a class="top-nav-link" href="${pageContext.request.contextPath }/article/gotoPublish">写博客</a></li>
  					<li id="nav-li-5" class="top-nav-li" data="${sessionScope.user.userName }">
  						<a id="nav-li-5-a" class="top-nav-link"  href="##"><img src="${sessionScope.user.userHeader}"/></a></li>
  					<li id="nav-li-6" class="top-nav-li" >
  						<a id="nav-li-6-a" class="top-nav-link"  href="${pageContext.request.contextPath }/user/logout">退出</a></li>
  				</c:if>
  					
  				</ul>
  			</div>
  		</div>
  	</div>
  </body>
</html>
